<!DOCTYPE html>
<html lang="zh">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      var time = Number(prompt("请输入整点时间（24时制）"))
      if (time < 5) {
        alert("不睡觉修仙？")
      } else if (time < 12) {
        alert("上午好！")
      } else if (time < 14) {
        alert("中午好！")
      } else if (time < 18) {
        alert("下午好！")
      } else if (time < 20) {
        alert("傍晚好！")
      } else if (time < 23) {
        alert("晚上好！")
      } else {
        alert("深夜好！")
      }
    </script>
  </body>
</html>
